import http from "@utils/request";


import { INoticeRequest, INoticeList, INoticeForm, INoticeFormAdd, INoticeFormUpdate } from "@interface/notice";

//字典列表
export const noticePage = (data: INoticeForm): Promise<INoticeList> => {
    return http.get<INoticeList>('/system_notice/page', data)
}

//添加字典
export const noticeAdd = (data: INoticeFormAdd): Promise<INoticeRequest> => {
    return http.post<INoticeRequest>('/system_notice/', data)
}


//字典详情
export const noticeGet = (data: string): Promise<INoticeRequest> => {
    return http.get<INoticeRequest>(`/system_notice/${data}`)
}



//修改字典
export const noticeUpdate = (data: INoticeFormUpdate): Promise<INoticeRequest> => {
    return http.put<INoticeRequest>('/system_notice/', data)
}



//删除字典
export const noticeDel = (data: string): Promise<INoticeRequest> => {
    return http.delete<INoticeRequest>(`/system_notice/${data}`)
}

